package cn.dnui_zjq823.dnuifood_16110100823.model;


import cn.dnui_zjq823.dnuifood_16110100823.iface.ShopIface;
import cn.dnui_zjq823.dnuifood_16110100823.listener.onRetrofitListener;
import cn.dnui_zjq823.dnuifood_16110100823.service.ShopService;
import retrofit2.Call;

/**
 * Created by dell on 2018/10/29.
 */

public class ShopModel extends BaseModel implements ShopIface{
    private ShopService service;
    public ShopModel(){
        super();
        service=retrofit.create(ShopService.class);
    };
    @Override
    public void getAllShops(onRetrofitListener listener) {
        Call call=service.getAllShops();
        bindCallback(call,listener,2);
    }

    @Override
    public void getFoodByShop(int shop_id, onRetrofitListener listener) {
        Call call=service.getFoodByShop(shop_id);
        bindCallback(call,listener,2);
    }
}
